import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/cupertino.dart' hide Action;
import 'package:flutter/material.dart';
import 'package:www.znpigai.teacher/global_store/state.dart';
import 'package:www.znpigai.teacher/home_page/subject_tab_component/item/state.dart';

class SubjectListState implements GlobalBaseState, Cloneable<SubjectListState> {
  bool isLoading = false; // 是否正在请求数据中
  bool isSelectable = false;
  String grade = '';
  String type = '';
  String tag = '';
  String theme = '';
  String keyword = '';
  bool self = false;

  List<SubjectState> items = <SubjectState>[];
  int pageIndex = GlobalState.firstPageIndex; // 页面索引
  int pageTotal = 1; // 页面总数

  SubjectListState();

  @override
  SubjectListState clone() {
    return SubjectListState()
      ..items = items
      ..pageIndex = pageIndex
      ..pageTotal = pageTotal
      ..grade = grade
      ..type = type
      ..tag = tag
      ..theme = theme
      ..keyword = keyword
      ..self = self
      ..isSelectable = isSelectable
      ..isLoading = isLoading;
  }

  @override
  Color themeColor;

  @override
  Map<String, dynamic> userInfo;
}
